<%
//用户
var user = shiro.getUser();
var title  = '食药局申请-从业人员登记表';
layout("/inc/layout.html",{
title:title,
keywords:title,
description:title,
style:'user.css'
}){
%>
    <!--项目发布-->
    <section  class="container">
        <div class="panel panel-default">
            <div class="panel-heading">
                <strong>食药变更-从业人员登记表</strong>
            </div>
            <div class="panel-body">
                <!--项目状态-->

                <form class="form-horizontal col-sm-offset-1 col-sm-9" id="saveEmployeeForm" method="post" action="/fooddrugChange/saveEmployee">
                  <input type="hidden" name="id" id="id" value="${id!}">
                  <input type="hidden" name="changeId" id="changeId" value="${changeId!}">
                    <div class="form-group">
                        <label for="name" class="col-sm-2 control-label">姓名：</label>
                        <div class="col-sm-10">               
                            <input type="text" class="form-control" id="name" name="name" value="${name!}" placeholder="从业人员姓名"
                                   required="required"> 
                                    <b class="text text-danger" id="name-error"></b>
                        </div>
                    </div>
                    
                    <div class="form-group">
                        <label class="col-sm-2 control-label">性别：</label>
                        <div class="col-sm-10">
                                <input type="radio" value="1" name="sex" id="sex1" ${sex==1? "checked"} ${sex==null? "checked"}>&nbsp;<font style="font-weight: bolder;">男</font>&nbsp;
                                <input type="radio" value="2" name="sex" id="sex2" ${sex==2? "checked"}>&nbsp;<font style="font-weight: bolder;">女</font>&nbsp;
                        </div>
                    </div>
                    
                    <div class="form-group">
                        <label class="col-sm-2 control-label">民族：</label>
                        <div class="col-sm-10" id="distpicker">
                            <select class="form-control" name="nation" id="nation">
                             <%for(nation in nationMap){%>
                             <option value="${nation.key}">${nation.value}</option>
                            <%}%>
                            </select>
                             <b class="text text-danger" id="nation-error"></b>
                        </div>
                    </div>
                    
                       <div class="form-group">
                        <label class="col-sm-2 control-label">职务：</label>
                        <div class="col-sm-10" id="distpicker">
                            <select class="form-control" name="job" id="job">
                                       <option value="1">食品安全技术员</option>
                                                  <option value="2">食品安全管理员</option>
                                                  <option value="3">其他人员</option>
                            </select>
                             <b class="text text-danger" id="job-error"></b>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="companyName" class="col-sm-2 control-label">户籍登记地址：</label>
                        <div class="col-sm-10">               
                            <input type="text" class="form-control" id="householdAddress" name="householdAddress" value="${householdAddress!}" placeholder="户籍登记地址"
                                   required="required"> 
                                    <b class="text text-danger" id="householdAddress-error"></b>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="companyName" class="col-sm-2 control-label">身份证号码：</label>
                        <div class="col-sm-10">               
                            <input type="text" class="form-control" id="cardNumber" name="cardNumber" value="${cardNumber!}" placeholder="从业人员证件号码"
                                   required="required"> 
                                    <b class="text text-danger" id="cardNumber-error"></b>
                        </div>
                    </div>
                    
                    <div class="form-group">
                        <label for="companyName" class="col-sm-2 control-label">手机号码：</label>
                        <div class="col-sm-10">               
                            <input type="text" class="form-control" id="phone" name="phone" value="${phone!}" placeholder="从业人员手机号码"
                                   required="required"> 
                                    <b class="text text-danger" id="phone-error"></b>
                        </div>
                    </div>
                    
                    <div class="form-group">
                        <label for="companyName" class="col-sm-2 control-label">健康证编号：</label>
                        <div class="col-sm-10">               
                            <input type="text" class="form-control" id="healthCertNumber" name="healthCertNumber" value="${healthCertNumber!}" placeholder="从业人员健康证编号"
                                   required="required"> 
                                    <b class="text text-danger" id="healthCertNumber-error"></b>
                        </div>
                    </div>
                    
                         
                    <div class="form-group">
                        <label for="companyName" class="col-sm-2 control-label">发证单位：</label>
                        <div class="col-sm-10">               
                            <input type="text" class="form-control" id="healthCertLeader" name="healthCertLeader" value="${healthCertLeader!}" placeholder="健康证发证单位"
                                   required="required"> 
                                    <b class="text text-danger" id="healthCertLeader-error"></b>
                        </div>
                    </div>
                    

                    <div class="form-group">
                        <label for="healthCertPictureUploader" class="col-sm-2 control-label">健康证照片：</label>
                        <div class="col-sm-5" id="healthCertPicture-box">
                            <input type="file" class="form-control" id="healthCertPictureUploader" name="files" data-max-file-count="5" multiple="multiple">
                            <b class="text text-danger" id="healthCertPicture-error"></b>
                             <hr></hr>
                            <span class="test-block" id="healthCertPicture-upload-error"></span>
                            <div id="healthCertPicture-upload-success">
                              <%
                                if(isNotEmpty(healthCertPicture)){
                                 %>
                                <div>
                                    <div class="thumbnail uploadImageShow">
                                        <input type="hidden" name="healthCertPicture" value="${healthCertPicture!}">
                                        <a href="${uploaderFilesDomain!}${healthCertPicture!}" target="_blank">
                                            <img src="${uploaderFilesDomain!}${healthCertPicture!}">
                                        </a>
                                         <div class="btn btn-block btn-danger deletetCover" onclick="$(this).parent().parent().remove();">删除</div>
                                    </div>
                                </div>
                                <%
                                 }
                                %>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
             <div class="panel-footer">
                <div class="col-sm-offset-3 clearfix">
                    <div class="mt5 mb5 block col-sm-3">
                    <button type="button" class="btn btn-warning btn-lg btn-block" id="cancelEmployee">&nbsp;取消&nbsp;</button>
                    </div>
                    <div class="mt5 mb5 block col-sm-3">
                     <button type="button" class="btn btn-danger btn-lg btn-block" id="submitEmployee">&nbsp;提交&nbsp;</button>
                    </div>
                </div>
            </div>
        </div>
</div>
    </section>
<% } %>
<script>
    require(['modules/fooddrug_employee'], function (fooddrugEmployee) {
    	fooddrugEmployee.info();
    });
</script>
</body>
</html>